<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Grade Form</title>
</head>
<body>
<h1>Grade Form</h1>
<form th:action="@{/grades}" th:object="${grade}" method="post">
    <div>
        <label>Student ID:</label>
        <select th:field="*{studentId}">
            <option th:each="student : ${students}" th:value="${student.studentId}" th:text="${student.studentId}"></option>
        </select>
    </div>
    <div>
        <label>Course Name:</label>
        <input type="text" th:field="*{courseName}" required/>
    </div>
    <div>
        <label>Grade:</label>
        <input type="number" th:field="*{grade}" required step="0.01"/>
    </div>
    <div>
        <button type="submit">Save</button>
    </div>
</form>
</body>
</html>
